package com.jhy.study2.date;

import java.util.Calendar;
import java.util.Date;

/**
 * @author: robert
 * @description: 日期练习
 * @date: 2021/8/22 22:49
 * @return
 */
public class Date1 {
    public static void main(String[] args) {
        Date date = new Date();
        System.out.println(date);

        Calendar calendar = Calendar.getInstance();
        int year = calendar.get(Calendar.YEAR);
        int month = calendar.get(Calendar.MONTH);

        System.out.println(calendar.getClass().getName());
        System.out.println("year,month:"+ year + " - " + month);



    }



}
